package com.frxuexi.lib_base.utils

import androidx.lifecycle.MutableLiveData
import java.util.concurrent.ConcurrentMap

object LiveDataBus {
    val map= hashMapOf<String,MutableLiveData<Any>>()

    fun <T> with(key:String):MutableLiveData<T>{
        if(!map.containsKey(key)){
            map[key]= MutableLiveData()
        }
        return map[key]!! as MutableLiveData<T>
    }
}